﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ApplicationLayer;
using NUnit.Framework;

namespace PersistenceLayer
{
#if (DEBUG)
    [TestFixture]
#endif
    public class PDesigner
    {
        public static List<GameBoard> boards = new List<GameBoard>();
        public static List<GamePiece> pieces = new List<GamePiece>();
        public static List<GameDesign> designs = new List<GameDesign>();

        public static void initialize()
        {
            GameDesign design = new GameDesign();
            design.createOriginalBlokus();
            pieces = design.pieces;
            boards.Add(design.board);
            designs.Add(design);

            design = new GameDesign();
            design.createDoubleBlokus();
            designs.Add(design);

            //we could load saved designs here....

        }
#if (DEBUG)
        [Test]
        public void Test01_CheckInitialize()
        {
            GameDesign design = new GameDesign();
            Assert.IsTrue(design.board.numColumns == 0);
            Assert.IsTrue(design.board.numRows == 0);
            Assert.IsTrue(design.pieces.Count == 0);
        }
        [Test]
        public void Test02_CheckOriginalBlokusLoad()
        {
            GameDesign design = new GameDesign();
            design.createOriginalBlokus();
            Assert.IsTrue(design.board.numColumns == 20);
            Assert.IsTrue(design.board.numRows == 20);
            Assert.IsTrue(design.pieces.Count > 0);

        }
#endif
    }
}
